import React from 'react'
import styles from './Confirm.module.css'
import BackDrop from '../BackDrop/BackDrop'
function Confirm(props) {
    return (
       
            <BackDrop className={styles.ConfirmOuter} onClick={(e)=>props.onCancel(e)}>
                <div className={styles.Confirm}>
                    <p className={styles.Text}>{props.confirmText}</p>
                    <div>
                        <button 
                        onClick={(e)=>props.onCancel(e)}
                        className={styles.Cancel}>取消</button>
                        <button 
                        onClick={(e)=>props.onOk(e)}
                        className={styles.Ok}>确认</button>
                    </div>
                </div>
            </BackDrop>
   

    )
}

export default Confirm